tb={'tl':' ','tm':' ','tr':' ',
    'ml':' ','mm':' ','mr':' ',
    'll':' ','lm':' ','lr':' '}
def pb(board):
  print(board['tl']+'|'+board['tm']+'|'+board['tr'])
  print('-+-+-')
  print(board['ml']+'|'+board['mm']+'|'+board['mr'])
  print('-+-+-')
  print(board['ll']+'|'+board['lm']+'|'+board['lr'])


turn='X'
for i in range(9):
  pb(tb)
  print('现在下'+turn)
  x=input('input x 坐标(l/m/r):')
  y=input('input y 坐标(t/m/l):')
  xy=y+x
  tb[xy]=turn
  if turn=='X':
    turn='O'
  else:
    turn='X'
